<template>
  <div>
     <div class="nav">
         {{this.$store.state.name}}
     </div>
  </div>
</template>

<script>
export default {
    mounted() {
        document.title = this.name
    },
    computed:{
        name(){
            return this.$store.state.name
        }
    },
    
    // activated(){
    //     document.title = this.name
    // }
    name:"Detail"
}
</script>

<style >
.nav{
    height: 50px;
    background: #c20c0c;
    color: white;
    text-align: center;
    line-height: 50px;
}
</style>